package com.project.springboot.stream;

import java.util.Objects;

/**
 * description: 男人
 * @author 朱正磊
 * @date 2025-07-01 11:02:56
 */
public class Man {

    private Integer id;

    private String name;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Man() {
    }

    public Man(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Man{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Man man = (Man) o;
        return Objects.equals(id, man.id) && Objects.equals(name, man.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name);
    }

}
